package com.sea.physical.service.impl;


import com.codecrane.core.web.AjaxReturn;
import com.sea.physical.entity.Port;
import com.sea.physical.mapper.PortMapper;
import com.sea.physical.service.PortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;


@Service
public class PortServiceImpl implements PortService
{

    @Autowired
    private PortMapper portInfoMapper;


    @Override
    public List<Port> findByCnd(Port port) {
        return portInfoMapper.findByCnd(port);
    }

    @Override
    public List<Port> findByParenId(Integer id) {
        return portInfoMapper.findByParenId(id);
    }

    @Override
    public int save(Port port) {
        return portInfoMapper.insert(port);
    }

    @Override
    public int delete(Integer id) {
        return portInfoMapper.delete(id);
    }

    @Override
    public List<Port> findByLevel(Integer portLevel) {
        return portInfoMapper.findByLevel(portLevel);
    }

    @Override
    public Port findById(Integer id) {
        return portInfoMapper.findById(id);
    }

    @Override
    public List<Port> getWareName() {
        return portInfoMapper.getWareName();
    }

    @Override
    public Port findByName(String portName) {
        return portInfoMapper.findByName(portName);
    }
}
